package common;

import lombok.Data;

@Data
public class Result {
   private int code;
   private String msg;
   private Object data;
    public static Result success(Object object){
       Result result = new Result();
       result.setCode(1);
       result.setMsg("success");
       result.setData(object);
       return result;
    }
    public static Result fail(Object object){
        Result result = new Result();
        result.setCode(0);
        result.setMsg("fail");
        result.setData(object);
        return result;
    }
}